build: Look for /usr/bin/gpgv2 vs /usr/bin/gpgv
authorColin Walters <walters@verbum.org>
Fri, 31 Jan 2014 00:32:59 +0000 (19:32 -0500)
committerColin Walters <walters@verbum.org>
Fri, 31 Jan 2014 00:32:59 +0000 (19:32 -0500)
For some reason, RHEL has gpgv, but Fedora doesn't.  We need to detect
which to use, since presumably Debian only has gpgv.

Makefile-libostree.am
configure.ac
src/libostree/ostree-gpg-verifier.c

index becdcfd045ec6bd7dffeece4778d24becb540b7d..060c058c292f14cbbcc333f8453cd46b18b627d1 100644 (file)
@@ -77,7 +77,7 @@ libostree_1_la_SOURCES += src/libostree/ostree-libarchive-input-stream.h \
        $(NULL)
 endif
 
-libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libgsystem -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS)
+libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libgsystem -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -DLOCALEDIR=\"$(datadir)/locale\" -DGPGVPATH=\"$(GPGVPATH)\" $(OT_INTERNAL_GIO_UNIX_CFLAGS)
 libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions -export-symbols-regex '^ostree_'
 libostree_1_la_LIBADD = libotutil.la libostree-kernel-args.la $(OT_INTERNAL_GIO_UNIX_LIBS)
 
index 27a560d145680c026cc49dc065065a2886dec0a8..7164a405c5feffbe716bff4860aa2d7e82437311 100644 (file)
@@ -101,6 +101,8 @@ AS_IF([ test x$with_gpgme != xno ], [
    AS_IF([ test x$have_gpgme = xyes], [
        AC_DEFINE(HAVE_GPGME, 1, [Define if we have gpgme])
        with_gpgme=yes
+       AC_PATH_PROG(GPGVPATH, [gpgv2 gpgv])
+       AC_SUBST(GPGVPATH)
        ], [ with_gpgme=no ])
 ], [ with_gpgme=no ])
 if test x$with_gpgme != xno; then OSTREE_FEATURES="$OSTREE_FEATURES +gpgme"; fi
index 8d363eb10624085200bea85c5d57ae8e22dbd491..d89c39c9d7a647b78a90069559e90a131343819a 100644 (file)
@@ -183,7 +183,7 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier   *self,
 
   g_main_context_push_thread_default (maincontext);
 
-  context = gs_subprocess_context_newv ("gpgv", NULL);
+  context = gs_subprocess_context_newv (GPGVPATH, NULL);
   gs_subprocess_context_set_stdin_disposition (context,
                                                GS_SUBPROCESS_STREAM_DISPOSITION_NULL);
   gs_subprocess_context_set_stdout_disposition (context,